<?php require ("header.php"); ?>
<?php 
	//Check Admin Session
	if ($ad_check<1){
			header ("Location:../../login.php?action=0");
	}
?>
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
}
.style1 {
	font-size: 18px;
	font-weight: normal;
}
.style3 {color: #000000}
.style4 {color: #FF0000}
-->
</style>
<table width="780" border="0" align="center">
  <tr>
    <td><div align="center" class="style1">
      <p class="style3"><strong>LECTURER'S NOTES UPLOAD FORM </strong></p>
      <p>&nbsp;</p>
	  <form action="process_note.php" method="post" enctype="multipart/form-data" name="note" id="note">
      <table width="600" border="0">
	    <tr>
          <td width="187"><span class="style3">Notes Department </span></td>
          <td width="10"><span class="style3">:</span></td>
          <td width="389">
		    <span class="style3">
		  <?php 
		  $sql_get_dept="SELECT ad_department FROM admin WHERE ad_no='$id'";
		  $get_dept=mysql_query($sql_get_dept);
		  $dept=mysql_fetch_assoc($get_dept);
		  $department=$dept['ad_department'];
		  ?>
		  <input name="note_department" type="text" id="note_department" size="59" value="<?php echo $dept['ad_department']; ?>" readonly="true">
		    </span></td>
        </tr>
        <tr>
          <td><span class="style3">Notes Subject </span></td>
          <td><span class="style3">:</span></td>
          <td><span class="style3">
            <select name="note_subject">
              <option></option>
                  <?php
		  $sql_get_subject="SELECT * FROM subject WHERE sub_department='$department'";
		  $result4=mysql_query($sql_get_subject);
		  $num_row=mysql_num_rows($result4);
		  if ($num_row>0) {
			  while ($sub = mysql_fetch_assoc($result4)) { ?>
              <option value="<?php echo $sub['sub_code']; ?>"><?php echo $sub['sub_name']; ?></option>
              <?php } }else { ?>
              <option>No Subject registered</option>
              <?php } ?>
            </select>
          </span> </td>
        </tr>
        <tr>
          <td><span class="style3">Notes Course </span></td>
          <td><span class="style3">:</span></td>
          <td><span class="style3">
            <select name="note_course">
              <option></option>
              <?php     $sql_fetch_course="SELECT course_name,course_code FROM course ORDER BY course_name ASC";
					$get_course=mysql_query($sql_fetch_course);
					while ($course = mysql_fetch_assoc($get_course)) { ?>
              <option value="<?php echo $course['course_code']; ?>"><?php echo $course['course_name']; ?></option>
              <?php }  ?>					
            </select>
          </span> </td>
        </tr>
        <tr>
          <td><span class="style3">Notes Topic </span></td>
          <td><span class="style3">:</span></td>
          <td><input name="note_topic" type="text" id="note_topic" size="59"></td>
        </tr>
        <tr>
          <td><span class="style3">Notes Description </span></td>
          <td><span class="style3">:</span></td>
          <td><span class="style3">
            <textarea name="note_desc" cols="45" rows="5" id="note_desc"></textarea>
          </span></td>
        </tr>
        <tr>
          <td><span class="style3"></span></td>
          <td><span class="style3"></span></td>
          <td><span class="style3"></span></td>
        </tr>
        <tr>
          <td valign="top"><span class="style3">Upload Notes </span></td>
          <td valign="top"><span class="style3">:</span></td>
          <td valign="top">
            <span class="style3">
            <input name="note_upload" type="file" id="note_upload" size="47">
          
            <br />
            <span class="style4">Please make sure that there is no '.' in the filename. For example, file with 'navigation_version 1.0' is not allowed. Please rename your file before submitting.</span></span></td>
        </tr>
      </table>
      <p>
        <input type="submit" name="Submit" value="Submit">
      </p>
      </form>
      <p>&nbsp;</p>
    </div></td>
  </tr>
</table>

<?php require ("footer.php"); ?>
